﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using LinFu.Reflection;

namespace CoreEx.Services
{
    
    public class CustomAssemblyLoader : IAssemblyLoader
    {
        public Assembly Load(string assemblyFile)
        {
            try
            {
                return Assembly.LoadFrom(assemblyFile);
            }
            catch (BadImageFormatException badImageFormatException)
            {                
                Trace.WriteLine(badImageFormatException);
                return null;
            }            
        }
    }
}
